<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <script src="../js/bootstrap.bundle.min.js"></script>
  <script src="../js/axios.min.js"></script>

</head>
<style>
  html,
  body {
    height: 100%;
  }

  .active {
    display: block;
  }
</style>

<body style="display: flex;">
  <div class="d-flex flex-column flex-shrink-0 p-3 text-white"
        style="width: 280px;height: 100%; background-color: rgb(65, 71, 68);">
        <a class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor"
                class="bi bi-house-door-fill" viewBox="0 0 16 16">
                <path
                    d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z" />
            </svg>
      <span class="fs-4">图书管理系统</span>
    </a>
    <hr>
    <ul class="nav nav-pills flex-column mb-auto">
      <li class="nav-item" id="li1">
        <a href="#" class="nav-link text-white" aria-current="page">
          首页
        </a>
      </li>
      <li id="li2">
        <a href="#" class="nav-link text-white" aria-current="page">
          管理员表
        </a>
      </li>
      <li id="li3">
        <a href="#" class="nav-link  active" aria-current="page">
          读者注册信息表
        </a>
      </li>
      <li id="li4">
        <a href="#" class="nav-link text-white" aria-current="page">
          读者借书登记
        </a>
      </li>
      <li id="li5">
        <a href="#" class="nav-link text-white">
         图书信息详情表
        </a>
      </li>
      <li id="li6">
        <a href="#" class="nav-link text-white" aria-current="page">
          图书分类
        </a>
      </li>
      <li id="li7">
        <a href="#" class="nav-link text-white" aria-current="page">
          图书借阅信息管理
        </a>
      </li>
    </ul>
    <hr>
    <!-- <div class="dropdown">
      <a href="#" class="d-flex align-items-center text-white text-decoration-none dropdown-toggle" id="dropdownUser1"
        data-bs-toggle="dropdown" aria-expanded="false">
        <img src="https://github.com/mdo.png" alt="" width="32" height="32" class="rounded-circle me-2">
        <strong>mdo</strong>
      </a>
      <ul class="dropdown-menu dropdown-menu-dark text-small shadow" aria-labelledby="dropdownUser1">
        <li><a class="dropdown-item" href="#">New project...</a></li>
        <li><a class="dropdown-item" href="#">Settings</a></li>
        <li><a class="dropdown-item" href="#">Profile</a></li>
        <li>
          <hr class="dropdown-divider">
        </li>
        <li><a class="dropdown-item" href="#">Sign out</a></li>
      </ul>
    </div> -->
  </div>
  <div class="b-example-divider" style="height: 100%;width:calc(100% - 280px);">
    <div class="header1" style="height:70px;background-color:rgb(11, 55, 112); opacity:.8"></div>
    <div class="scoreList" style="height:calc(100% - 70px);background-color:#fff;padding:50px;">
      <div class="list">
        <table class="table table-bordered">

          <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#myModal"
            class="btn btn-primary" style="margin-bottom: 10px;">添加</button>
          <button class="btn btn-success" onclick="queryByGender('男')" style="margin-bottom: 10px;margin-left: 20px; margin-right: 20px;">男</button>
          <button class="btn btn-success" onclick="queryByGender('女')" style="margin-bottom: 10px;">女</button>
          <input type="text" placeholder="请输入你要搜索的读者姓名" id="likename" style="margin-left: 20px;margin-bottom: 20px;">
          <button class="btn btn-info" onclick="queryByLikeName()" style="margin-bottom: 10px;margin-left:20px;">搜索</button>

          <!-- 模态框 -->
          <div class="modal fade" id="myModal">
            <div class="modal-dialog">
              <div class="modal-content">

                <!-- 模态框头部 -->
                <div class="modal-header">
                  <h4 class="modal-title">添加读者信息</h4>
                  <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>

                <!-- 模态框内容 -->
                <div class="modal-body" style="margin-left: 20px;">
                  <!-- 模态框内容.. -->
                  
                  姓名：<input type="text" id="reader_name" placeholder="请输入添加的姓名"></br>
                  性别：<input type="text" id="sex" placeholder="请输入添加的性别" style="margin-top: 15px;"></br>
                  电话：<input type="text" id="phone" placeholder="请输入添加的电话" style="margin-top: 15px;"></br>
                  卡号：<input type="text" id="card" placeholder="请输入添加的卡号" style="margin-top: 15px;"></br>
                </div>

                <!-- 模态框底部 -->
                <div class="modal-footer">
                  <button type="button" class="btn btn-primary" onclick="AddStudent()">确定</button>
                  <button type="button" class="btn btn-danger" data-bs-dismiss="modal">关闭</button>
                </div>

              </div>
            </div>
          </div>
          <thead style="text-align: center;">
            <tr>
              <th>ID</th>
              <th>姓名</th>
              <th>性别</th>
              <th>电话号码</th>
              <th>卡号</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody style="text-align: center;" class="tbd">
            <!-- <tr>
              <td>Tanmay</td>
              <td>Bangalore</td>
              <td>560001</td>
              <td>560001</td>
              <td>560001</td>
              <td>
                <button type="button" class="btn btn-warning">修改</button>
                <button type="button" class="btn btn-danger">删除</button>
              </td>
            </tr> -->
              <!-- 修改模态框 -->
          <div class="modal fade" id="updatestudent">
            <div class="modal-dialog">
              <div class="modal-content">

                <!-- 模态框头部 -->
                <div class="modal-header">
                  <h4 class="modal-title">修改读者信息</h4>
                  <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>

                <!-- 模态框内容 -->
                <div class="modal-body" style="margin-left: 20px;">
                  <!-- 模态框内容.. -->
                  <input type="hidden"id='reader_id'>
                  姓名：<input type="text" id="name_id" placeholder="请输入添加的姓名"></br>
                  性别：<input type="text" id="sex_id" placeholder="请输入添加的性别" style="margin-top: 15px;"></br>
                  电话：<input type="text" id="phone_id" placeholder="请输入添加的电话" style="margin-top: 15px;"></br>
                  卡号：<input type="text" id="card_id" placeholder="请输入添加的卡号" style="margin-top: 15px;"></br>
                </div>

                <!-- 模态框底部 -->
                <div class="modal-footer">
                  <button type="button" class="btn btn-primary" onclick="update()">确定</button>
                  <button type="button" class="btn btn-danger" data-bs-dismiss="modal">关闭</button>
                </div>

              </div>
            </div>
          </div>
          </tbody>
        </table>
      </div>
    </div>
  </div>
  <script src="../js/skip.js"></script>

</body>
<script src="../js/index_zl.js"></script>
</html>